﻿namespace FFF.Test
{
    using System;
    using System.IO;
    using System.Linq;
    using System.Reflection;
    using System.Text;
    using System.Threading.Tasks;
    using Abp.Application.Services;
    using Abp.Extensions;
    using Hangfire;
    using Microsoft.AspNetCore.Authentication.JwtBearer;
    using Microsoft.AspNetCore.Builder;
    using Microsoft.AspNetCore.Hosting;
    using Microsoft.AspNetCore.StaticFiles;
    using Microsoft.Extensions.Configuration;
    using Microsoft.Extensions.DependencyInjection;
    using Microsoft.Extensions.Options;
    using Microsoft.IdentityModel.Logging;
    using Microsoft.IdentityModel.Tokens;
    using Senparc.CO2NET;
    using Senparc.CO2NET.RegisterServices;
    using Senparc.Weixin;
    using Senparc.Weixin.Entities;
    using Senparc.Weixin.MP;
    using Senparc.Weixin.RegisterServices;
    using Senparc.Weixin.TenPay;
    using Senparc.Weixin.WxOpen;
    using Swashbuckle.AspNetCore.Swagger;
    using Swashbuckle.AspNetCore.SwaggerGen;
    using FFF.Test.Util.Consts;
    using Abp.AspNetCore;
    using FFF.Test.Application;
    using Abp.AspNetCore.SignalR.Hubs;

    /// <summary>
    /// Hangfire文档配置
    /// </summary>
    public static class SignalRConfigurer
    {
        /// <summary>
        /// 配置service
        /// </summary>
        /// <param name="services">程序的服务对象</param>
        /// <param name="configuration">程序的配置对象</param>
        /// <param name="env">环境节点</param>
        public static void ConfigureServices(IServiceCollection services, IConfiguration configuration, IHostingEnvironment env)
        {
        }

        /// <summary>
        /// 配置中间件
        /// </summary>
        /// <param name="app">app环境</param>
        /// <param name="env">env的环境</param>
        public static void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseSignalR(routes =>
            {
                routes.MapHub<MyChatHub>("/signalr-myChatHub");
                routes.MapHub<AbpCommonHub>("/signalr");
            });
        }
    }
}
